package com.ys.utils.yinsheng.yztdock.common;

import com.ys.utils.base.j2se.Logger;

/**
 * 项目业务常量配置
 */
public class ProjectConstants {
    // ===========redis mq通道名=============
    /** 用户激活 */
    public static final String MQ_CHANNEL_USER_VIDEO = "redis-mq-user-video";
    /** 视频有修改 */
    public static final String MQ_CHANNEL_VIDEO_MODIFY = "redis-mq-video-modify";
    /** 视频下架 */
    public static final String MQ_CHANNEL_VIDEO_DOWN = "redis-mq-video-down";
    /** 用户注册 */
    public static final String MQ_USER_REGIST = "redis-mq-user-regist";
    /** 钻石提现任务 */
    public static final String MQ_CHANNEL_WITHDRAW = "redis-mq-withdraw";
    /** 充值后用户加经验 */
    public static final String MQ_CHANNEL_USER_EXP = "redis-mq-user-exp";
    /** 充值后用户更新经验和钻石 */
    public static final String MQ_CHANNEL_USER_EXP_UPDATE = "redis-mq-user-exp-update";
    /** 用户打赏队列 */
    public static final String MQ_CHANNEL_GIFT = "redis-mq-gift";
    /** 用户关注队列 */
    public static final String MQ_CHANNEL_USER_FOCUS = "redis-mq-user-focus";
    /** 用户注册后增加粉丝数 */
    public static final String MQ_USER_REGIST_FANS = "redis-mq-user-regist-fans";
    /** 评论后发送评论消息 */
    public static final String MQ_CHANNEL_COMMENT_NOTICE = "redis-mq-comment-notice";
    /** 用户视频列表刷新 */
    public static final String MQ_CHANNEL_VIDEO_USER_REFRESH = "redis-mq-video-user-refresh";
    /** 商户核销券码后 */
    public static final String MQ_CHANNEL_ORDER_USE_MONEY = "redis-mq-order-use-money";
    public static final String MQ_CHANNEL_ORDER_USE_DIAMOND = "redis-mq-order-use-diamond";
    /** 商户券码返佣后保存记录 */
    public static final String MQ_CHANNEL_ORDER_FEE = "redis-mq-order-fee";
    /** 商户现金账户动账队列 */
    public static final String MQ_MERC_CASH = "redis-mq-merc-cash";
    /** 银盛提现结果查询队列 */
    public static final String MQ_WITHDRAW_QUERY = "redis-mq-withdraw-query";
    /** 银盛推广收益提现结果查询队列 */
    public static final String MQ_WITHDRAW_TG_QUERY = "redis-mq-withdraw-tg-query";
    /** 银盛充值结果查询队列 */
    public static final String MQ_RECHARGE_QUERY = "redis-mq-wallet:recharge-query";
    /** 银盛个人钱包转账队列 */
    public static final String MQ_WALLET_TRANSFER = "redis-mq-wallet:transfer";
    /** 银盛个人钱包充值补贴手续费队列 */
    public static final String MQ_WALLET_TRANSFER_RECHARGE = "redis-mq-wallet-recharge:transfer";
    /** 银盛个人钱包转账查询队列 */
    public static final String MQ_WALLET_TRANSFER_QUERY = "redis-mq-wallet:transfer-query";
    /** 银盛商户向平台转账结果查询队列 */
    public static final String MQ_MERC_PLATFORM_TRANSFER_QUERY = "redis-mq-merc_platform_transfer-query";

    // ===========websocket消息类型=============
    /** 测试消息 */
    public static final int WS_TYPE_TEST = 1;

    // ===========video播放相关=============
    /** 用户播放列表 zset for long */
    public static final String VIDEO_USER_LIST = "video-user-play-";
    /** 视频库列表 hash for long BusiVideo */
    public static final String VIDEO_LIST = "video-list";
    /** 视频首发红包信息 val for BusiRedInfo */
    public static final String VIDEO_RED = "video-red-";
    /** 视频首发红包信息 set for userId string */
    public static final String VIDEO_RED_GET = "video-red-get-";
    /** 用户关注集合 set for long */
    public static final String USER_FOCUS_SET = "user-focus-";
    /** 用户观看集合 zset for long */
    public static final String USER_ACTION_SET = "user-action-";
    /** 用户观看历史 list for long */
    public static final String USER_VIDEO_HISTORY = "user-video-history-";

    // ===========APP登录相关常量=============
    /** token有效时长（秒） 默认10小时 */
    public static final Integer TOKEN_EXPIRETIME = 60 * 60 * 240;
    /** 请求头中token的name */
    public static final String HEADER_TOKEN_NAME = "token";
    /** 会话信息在redis中保存的前缀 */
    public static final String REDIS_TOKEN_PREFIX = "spring-session-app-";

    // ===========redis有效期配置=============
    /** 用户播放列表有效期，单位：小时 */
    public static final long EXPIRE_VIDEO_LIST = 240;

    // ===========redis同步锁key配置=============
    /** 用户团队操作前缀  */
    public static final String REDIS_LOCK_USER_TEAM_PREFIX = "redis-lock-user-team-";
    /** 抢红包锁 */
    public static final String REDIS_LOCK_RED_GET_PREFIX = "redis-lock-red-get-";
    /** 用户账户锁 钻石动账时使用 */
    public static final String REDIS_LOCK_USER_WALLET_PREFIX = "redis-lock-wallet-user-";
    /** 用户现金账户锁 现金动账时使用 */
    public static final String REDIS_LOCK_USER_CASH_WALLET_PREFIX = "redis-lock-cash-wallet-user-";

    // ===========用户内置角色id=============
    /** app用户默认角色id  */
    public static final Long APP_ROLE_ID = 2L;

    // ===========缓存HASH key=============
    /** 用户推送ID缓存 */
    public static final String HASH_USER_PUSH_ID = "user-push-id";
    /** 等级经验配置缓存 */
    public static final String HASH_EXP_CACHE = "cache-exp";
    /** 地址缓存 */
    public static final String HASH_SYS_ADDR_LIST = "sys-addr-list";
    /** 商圈地区缓存 */
    public static final String HASH_SYS_AREA_LIST = "sys-area-list";
    /** 评论点赞缓存 */
    public static final String HASH_VIDEO_COMMENT_STAR = "hash-video-comment-star";
    /** 用户评论点赞缓存 set */
    public static final String USER_VIDEO_COMMENT_STAR = "user-video-comment-star-";

    // ===========缓存HASH key=============
    /** 商户类别树形结构缓存 */
    public static final String CACHE_BUSIMERCCATEGORY = "redis-cache-busimerccategory";
    /** 返佣比例缓存 */
    public static final String CACHE_CONFIGREBATE = "redis-cache-configrebate";

    // ===========开关=============
    public static final String SWITCH_RECHARGE = "redis-switch-recharge";
    public static final String SWITCH_WITHDRAW = "redis-switch-withdraw";
    public static final String SWITCH_ALIPAY_INDEX = "redis-switch-alipay-index";

    // ===========第三方支付订单前缀=============
    public static final String ORDERNO_PREFIX_PAY = "THIRD_PAYMENT_";

    /** 是否生产模式 */
    public static boolean isProd () {
        return Logger.isOnline();
    }
}
